<script language="javascript" type="text/javascript">
	$.getScript('js/feature.tab.js', function() {
		$(document).ready(function() {
			showVoteGraph();
		});
	});
</script>

<div class="header">
	<div class="pageLinks">
		<a href="#/機能" onclick="loadPage('機能');return false;">機能</a> &gt; 
		<a href="#/<?php echo $parent_page ?>" onclick="loadPage('<?php echo $parent_page ?>');return false;"><?php echo $parent_page ?></a> &gt; 
		<strong>アンケート表示</strong>
	</div>
	<div class="Group_name" style="padding-left: 80px">
		グループ： <?php echo $group_name ?>
	</div>
	<div class="Help" style="position:absolute;top:55px;left:652px;">
		<img src="image/Help_Button.gif" onclick="showHelp('vote');" />
	</div
</div>

<div class="tab_content">
	<table class="voteTable" width="100%"  border="1px">
		<tr  class="titleRow"  >
			<td colspan="3"  style="color:#fff">アンケート内容</td>
		</tr>
		<tr class="titleRow">
			<th width="12%">アイコン</th>
			<th width="26%">名前</th>
			<th width="62%">内容</th>
		</tr>
		<tr>
			<td style="text-align:center;padding:5px 3px 3px 3px;">
				<img width="46" src="<?php echo $vote_tweet->tweet->icon; ?>">
			</td>
			<td><?php echo $vote_tweet->name;?></td>
			<td><?php echo $vote_tweet->tweet->comment;?></td>
		</tr>
	</table>
	
	<table style="width:100%;">
		<tr>
		<td style="width:60%;border: 0px;">
		<div id="empty_vote_chart" style="display:none;margin: 30px 0 0 90px;"><img src="image/chart_zero.jpg"></div>
		<div id="vote_chart" style="display:none;"></div>
	
	</td>
	
	<td style="width:40%;">
		<table id="voteTable" class="voteTable" width="100%" height="8%" border="1px" style="text-align:center;margin-bottom:4%;">
				<tr style="background-color:#5fa2f1;">
					<th width="70%">項目</th>
					<th>票</th>
				</tr>
			<?php foreach ($vote_tweet->alternatives as $alternative) { ?>
				<tr name="vote_row">
					<td name="name"><?php echo $alternative['name']; ?></td>
					<td name="votes"><?php echo $alternative['votes']; ?></td>
				</tr>
			<?php } ?>
		</table>
		
		<table class="voteTable" width="100%" height="8%" border="1px" style="text-align:center;">
			<tr>
				<th width="70%" style="background-color:f8d830;">回答者数</th>
				<td><?php echo $total_votes; ?>人</td>
			</tr>
		</table>	
	</td>
	</tr>
	</table>

	<div style="clear:left;width:100%;margin:15px 0 0 0;">
	<h2 style="margin:15px 10px 10px 10px">回答済み者</h2>		

		<table class="voteTable" width="100%"  border="1px">
			<?php if (!empty($answers)) { ?>
				<tr style="background-color:#5fa2f1;">
					<th width="12%">アイコン</th>
					<th width="27%">名前</th>
					<th width="34%">Twitter名</th>
					<th width="27%">選択内容</th>
				</tr>
			<?php } else { ?>
				<tr>
					<td>現在は回答者がいません。</td>
				</tr>
			<?php }
				foreach ($answers as $answer) { ?>
				<tr>
					<td style="text-align:center;padding:5px 3px 3px 3px;"><img width="46" src="<?php echo $answer->icon; ?>"></td>
					<td><?php echo $answer->name; ?></td>
					<td><?php echo $answer->twitter_username; ?></td>
					<td><?php echo $answer->vote; ?></td>
				</tr>
			<?php } ?>
		</table>

	<?php if (!empty($no_answers)) { ?>
		<h2 style="margin:10px">未回答者</h2>
		<table class="voteTable" width="455px"  border="1px">
			<tr style="background-color:#5fa2f1;">
				<th width="12%">アイコン</th>
				<th width="27%">名前</th>
				<th width="34%">Twitter名</th>
			</tr>
			<?php foreach ($no_answers as $no_answer) { ?>
				<tr>
					<td style="text-align:center;padding:5px 3px 3px 3px;"><img width="46" src="<?php echo $no_answer->icon; ?>"></td>
					<td><?php echo $no_answer->name; ?></td>
					<td><?php echo $no_answer->twitter_username; ?></td>
				</tr>
			<?php } ?>
		</table>
	<?php } ?>
		<input type="button" value="更新" onclick="loadPage('reload');" style="margin:20px 0 0 91.5%;">
	</div>
</div>